To refrain from entering a place or condition.
After being warned, he kept out.
To restrain someone or something from entering a place or condition.
The warning kept him out.